<?php
/**
 * Created by PhpStorm.
 * User: 王泽锋
 * Date: 2018/03/05
 * Time: 13:58
 */

namespace app\admin\validate;

use think\Validate;

class Commodity extends Validate
{
    protected $rule = [
        'front_cover'  =>  'require',
        'title' =>  'require',
        'price'=>'require',
        'stock'=>'require',
        'content'  =>  'require',
        'publisher'  =>  'require',
    ];

    protected $message = [
        'front_cover.require'  =>  '请添加封面图片！',
        'title.require' =>  '请填写商品名称！',
        'price.require'=>'请填写价格!',
        'stock.require'=>'请填写库存!',
        'content.require'  =>  '请填写内容！',
        'publisher.require'  =>  '请填写发布人！',
    ];
}